// Evol scripts.
// Authors:
//    4144
//    Reid
// Description:
//    Allows to cut a Croconut in multiple parts.
//
// Possible choices for L_Weapon:
//    rif(countitem(35xx), l(getitemname(xx))), L_Weak,
//    rif(countitem(35yy), l(getitemname(yy))), L_Good,

000-2-1,0,0,0	script	Croconut	NPC_HIDDEN,{
    close;

OnUse:
    mesn "Narrator";
    mes col(l("Do you want to cut this @@?", getitemlink(513)), 9);
    next;

    menu
        l("Yes."), L_Weapon,
        l("No."), -;

    getitem 513, 1;
    close;

L_Weapon:
    mes "";
    mesn "Narrator";
    mes col(l("Which of your weapons do you want to use in order to cut this @@?", getitemlink(513)), 9);
    next;

    menu
        rif(countitem(3500) > 0, l(getitemname(3500))), L_Weak,
        rif(countitem(3501) > 0, l(getitemname(3501))), L_Weak,
        rif(countitem(3502) > 0, l(getitemname(3502))), L_Good,
        rif(countitem(3503) > 0, l(getitemname(3503))), L_Weak,
        rif(countitem(3504) > 0, l(getitemname(3504))), L_Good,
        l("Bare Hands"), -;

L_TooWeak:
    mes "";
    mesn "Narrator";

    .@q = rand(5);
    if (.@q == 0) goto L_TooWeakLost;
    if ( (.@q == 1) || (.@q == 2) ) goto L_TooWeakFail;
    if ( (.@q == 3) || (.@q == 4) || (.@q == 5) ) goto L_Weak;

L_TooWeakLost:
    mes col(l("You hit too hard with your fist, you destroyed your @@.", getitemlink(513)), 9);

    close;

L_TooWeakFail:
    mes col(l("Your hands are too weak, you did not succeed in opening this @@.", getitemlink(513)), 9);

    getitem 513, 1;
    close;

L_Weak:
    mes col(l("You opened the @@ in two parts, but you crushed one of them.", getitemlink(513)), 9);

    getitem 512, 1;
    close;

L_Good:
     mes col(l("You perfectly cut your @@ into two edible parts.", getitemlink(513)), 9);

    getitem 512, 2;
    close;
}
